#!/bin/sh

grep -s mlocate /etc/group || addgroup mlocate
chgrp mlocate %OPTWARE_TARGET_PREFIX%/var/mlocate
chmod g=rx,o= %OPTWARE_TARGET_PREFIX%/var/mlocate
chgrp mlocate %OPTWARE_TARGET_PREFIX%/bin/locate
chmod g+s,go-w %OPTWARE_TARGET_PREFIX%/bin/locate

touch %OPTWARE_TARGET_PREFIX%/var/mlocate/mlocate.db
chgrp mlocate %OPTWARE_TARGET_PREFIX%/var/mlocate/mlocate.db
